Left Termination of the query pattern
p_in_1(a)
w.r.t. the given Prolog program could successfully be proven:
↳ Prolog
↳ PrologToPiTRSProof
Clauses:
p(.(A, [])) :- l(.(A, [])).
r(1).
l([]).
l(.(H, T)) :- ','(r(H), l(T)).
Queries:
p(a).
We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in(.(A, [])) → U1(A, l_in(.(A, [])))
l_in(.(H, T)) → U2(H, T, r_in(H))
r_in(1) → r_out(1)
U2(H, T, r_out(H)) → U3(H, T, l_in(T))
l_in([]) → l_out([])
U3(H, T, l_out(T)) → l_out(.(H, T))
U1(A, l_out(.(A, []))) → p_out(.(A, []))
The argument filtering Pi contains the following mapping:
p_in(x1) = p_in
.(x1, x2) = .(x2)
[] = []
U1(x1, x2) = U1(x2)
l_in(x1) = l_in(x1)
U2(x1, x2, x3) = U2(x2, x3)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
U3(x1, x2, x3) = U3(x3)
l_out(x1) = l_out
p_out(x1) = p_out(x1)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in(.(A, [])) → U1(A, l_in(.(A, [])))
l_in(.(H, T)) → U2(H, T, r_in(H))
r_in(1) → r_out(1)
U2(H, T, r_out(H)) → U3(H, T, l_in(T))
l_in([]) → l_out([])
U3(H, T, l_out(T)) → l_out(.(H, T))
U1(A, l_out(.(A, []))) → p_out(.(A, []))
The argument filtering Pi contains the following mapping:
p_in(x1) = p_in
.(x1, x2) = .(x2)
[] = []
U1(x1, x2) = U1(x2)
l_in(x1) = l_in(x1)
U2(x1, x2, x3) = U2(x2, x3)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
U3(x1, x2, x3) = U3(x3)
l_out(x1) = l_out
p_out(x1) = p_out(x1)
Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
P_IN(.(A, [])) → U11(A, l_in(.(A, [])))
P_IN(.(A, [])) → L_IN(.(A, []))
L_IN(.(H, T)) → U21(H, T, r_in(H))
L_IN(.(H, T)) → R_IN(H)
U21(H, T, r_out(H)) → U31(H, T, l_in(T))
U21(H, T, r_out(H)) → L_IN(T)
The TRS R consists of the following rules:
p_in(.(A, [])) → U1(A, l_in(.(A, [])))
l_in(.(H, T)) → U2(H, T, r_in(H))
r_in(1) → r_out(1)
U2(H, T, r_out(H)) → U3(H, T, l_in(T))
l_in([]) → l_out([])
U3(H, T, l_out(T)) → l_out(.(H, T))
U1(A, l_out(.(A, []))) → p_out(.(A, []))
The argument filtering Pi contains the following mapping:
p_in(x1) = p_in
.(x1, x2) = .(x2)
[] = []
U1(x1, x2) = U1(x2)
l_in(x1) = l_in(x1)
U2(x1, x2, x3) = U2(x2, x3)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
U3(x1, x2, x3) = U3(x3)
l_out(x1) = l_out
p_out(x1) = p_out(x1)
P_IN(x1) = P_IN
U31(x1, x2, x3) = U31(x3)
L_IN(x1) = L_IN(x1)
U11(x1, x2) = U11(x2)
U21(x1, x2, x3) = U21(x2, x3)
R_IN(x1) = R_IN
We have to consider all (P,R,Pi)-chains
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
Pi DP problem:
The TRS P consists of the following rules:
P_IN(.(A, [])) → U11(A, l_in(.(A, [])))
P_IN(.(A, [])) → L_IN(.(A, []))
L_IN(.(H, T)) → U21(H, T, r_in(H))
L_IN(.(H, T)) → R_IN(H)
U21(H, T, r_out(H)) → U31(H, T, l_in(T))
U21(H, T, r_out(H)) → L_IN(T)
The TRS R consists of the following rules:
p_in(.(A, [])) → U1(A, l_in(.(A, [])))
l_in(.(H, T)) → U2(H, T, r_in(H))
r_in(1) → r_out(1)
U2(H, T, r_out(H)) → U3(H, T, l_in(T))
l_in([]) → l_out([])
U3(H, T, l_out(T)) → l_out(.(H, T))
U1(A, l_out(.(A, []))) → p_out(.(A, []))
The argument filtering Pi contains the following mapping:
p_in(x1) = p_in
.(x1, x2) = .(x2)
[] = []
U1(x1, x2) = U1(x2)
l_in(x1) = l_in(x1)
U2(x1, x2, x3) = U2(x2, x3)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
U3(x1, x2, x3) = U3(x3)
l_out(x1) = l_out
p_out(x1) = p_out(x1)
P_IN(x1) = P_IN
U31(x1, x2, x3) = U31(x3)
L_IN(x1) = L_IN(x1)
U11(x1, x2) = U11(x2)
U21(x1, x2, x3) = U21(x2, x3)
R_IN(x1) = R_IN
We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 1 SCC with 4 less nodes.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
Pi DP problem:
The TRS P consists of the following rules:
U21(H, T, r_out(H)) → L_IN(T)
L_IN(.(H, T)) → U21(H, T, r_in(H))
The TRS R consists of the following rules:
p_in(.(A, [])) → U1(A, l_in(.(A, [])))
l_in(.(H, T)) → U2(H, T, r_in(H))
r_in(1) → r_out(1)
U2(H, T, r_out(H)) → U3(H, T, l_in(T))
l_in([]) → l_out([])
U3(H, T, l_out(T)) → l_out(.(H, T))
U1(A, l_out(.(A, []))) → p_out(.(A, []))
The argument filtering Pi contains the following mapping:
p_in(x1) = p_in
.(x1, x2) = .(x2)
[] = []
U1(x1, x2) = U1(x2)
l_in(x1) = l_in(x1)
U2(x1, x2, x3) = U2(x2, x3)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
U3(x1, x2, x3) = U3(x3)
l_out(x1) = l_out
p_out(x1) = p_out(x1)
L_IN(x1) = L_IN(x1)
U21(x1, x2, x3) = U21(x2, x3)
We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
Pi DP problem:
The TRS P consists of the following rules:
U21(H, T, r_out(H)) → L_IN(T)
L_IN(.(H, T)) → U21(H, T, r_in(H))
The TRS R consists of the following rules:
r_in(1) → r_out(1)
The argument filtering Pi contains the following mapping:
.(x1, x2) = .(x2)
r_in(x1) = r_in
1 = 1
r_out(x1) = r_out(x1)
L_IN(x1) = L_IN(x1)
U21(x1, x2, x3) = U21(x2, x3)
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
U21(T, r_out(H)) → L_IN(T)
L_IN(.(T)) → U21(T, r_in)
The TRS R consists of the following rules:
r_in → r_out(1)
The set Q consists of the following terms:
r_in
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- L_IN(.(T)) → U21(T, r_in)
The graph contains the following edges 1 > 1
- U21(T, r_out(H)) → L_IN(T)
The graph contains the following edges 1 >= 1